#ifndef CAMERA_H_
#define CAMERA_H_

#include "Vec3.h"
#include "SmartPtr.h"

/* A C++ wrapper around the  gluLookAt() function */
class Camera : public RefCounted
{
public:
    /* Default Ctr */
    Camera();
    /* Overloaded Ctr */
    Camera(const Vec3f& pos, const Vec3f& look, const Vec3f& up);

    void Update();

    void Prepare();
    /* Debug Draw Function */
    void Draw() const;

    /* Set Functions */
    void SetVelocity(const Vec3f& vel);
    void SetPosition(const Vec3f& pos);
    void SetLook(const Vec3f& look);
    /* Get Functions */
    const Vec3f& GetPos() const;

private:

    /* Holds the data necessary for the gluLookAt Function */
    Vec3f m_pos;
    Vec3f m_look;
    
    Vec3f m_up; // currently always {0,1,0}
    
    /* Allows the camera to accelerate and interpolate between two directions */
    Vec3f m_vel;
    Vec3f m_dir;
};

typedef SmartPtr<Camera> pCamera;
#endif